import Vue from 'vue'
import App from './App.vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import router from './router';
import locale from 'element-ui/lib/locale/lang/en';
import i18n from './i18n';
// 全局样式
import '@/styles/index.scss'
// element 样式
import 'element-theme-chalk';
import "./permission";
import '@/utils/error-log';
import store from '@/store';
import * as filters from './filters' // global filters

import {mockXHR} from '@/mock/index.js';
if(process.env.NODE_ENV === 'development'){
  // 开发模式下进行 mock 数据
  mockXHR();
}
 

Vue.config.productionTip = false

Vue.use(ElementUI,{
  locale
});

// register global utility filters
Object.keys(filters).forEach(key => {
  Vue.filter(key, filters[key])
})

new Vue({
  router,
  store,
  i18n,
  render: h => h(App),
}).$mount('#app')
